package com.tanguy.user.bean.station;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by dab on 2017/11/21 0021 15:19
 */

public class CarBean implements Parcelable {
    /**
     * id : 1
     * name : 经济型
     * type : 3
     * img : 11
     * code : null
     */

    private int id;
    private String name;
    private int type;
    private String img;
    private int code;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeString(this.name);
        dest.writeInt(this.type);
        dest.writeString(this.img);
        dest.writeInt(this.code);
    }

    public CarBean() {
    }

    protected CarBean(Parcel in) {
        this.id = in.readInt();
        this.name = in.readString();
        this.type = in.readInt();
        this.img = in.readString();
        this.code = in.readInt();
    }

    public static final Parcelable.Creator<CarBean> CREATOR = new Parcelable.Creator<CarBean>() {
        @Override
        public CarBean createFromParcel(Parcel source) {
            return new CarBean(source);
        }

        @Override
        public CarBean[] newArray(int size) {
            return new CarBean[size];
        }
    };
}
